<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 200px;
        height: 50px;
        text-align: center;
        line-height: 50px;
        font-size: 22px;
        font-weight: bold;
      }
      .nav {
        position: relative;
        transition: all 1s linear;
        transform-style: preserve-3d;
        float: left;
        margin-right: 20px;
      }
      .nav:hover {
        transform: rotateX(90deg);
      }
      .top {
        background-color: red;
        transform: translateZ(25px);
      }
      .bottom {
        /* 绝对定位 */
        position: absolute;
        background-color: blue;
        top: 0;
        z-index: 0;
        transform: translateY(25px) rotateX(-90deg);
      }
    </style>
  </head>
  <body>
    <div class="nav">
      <div class="box top">云创动力</div>
      <div class="box bottom">开发喵</div>
    </div>
    <div class="nav">
      <div class="box top">云创动力</div>
      <div class="box bottom">开发喵</div>
    </div>
    <div class="nav">
      <div class="box top">云创动力</div>
      <div class="box bottom">开发喵</div>
    </div>
    <div class="nav">
      <div class="box top">云创动力</div>
      <div class="box bottom">开发喵</div>
    </div>
    <div class="nav">
      <div class="box top">云创动力</div>
      <div class="box bottom">开发喵</div>
    </div>
  </body>
</html>
